package framework.model;

import java.util.*;

public class SumFunctor implements IFunctor<Entry> {
    Double sumValue;
    public SumFunctor() {
        this.sumValue = 0.0;
    }

    @Override
    public void compute(Entry v) {
        sumValue += v.getAmount();
    }

    @Override
    public Double getValue() {
        return sumValue;
    }
}